from django.conf.urls import url
from . import views


urlpatterns = [
	#博客主页面
    url(r'^$', views.index, name='index'),
	#博客的全部博文
    url(r'^posts/$', views.post_list, name='post_list'),
        url(r'^posts/tag/(?P<tag_slug>[-\w]+)/$', views.post_list, name='post_list_by_tag'),
	#单个博文详细内容页面
    url(r'^posts/(?P<post_id>\d+)/$', views.post_detail, name='post_detail'),
    url(r'^posts/(?P<post_id>\d+)/share/$', views.post_share,
    name='post_share'),
    url(r'^add/$', views.post_add, name='post_add'),
    url(r'^add/add_sub/$', views.post_sub, name='post_sub'),
    url(r'^posts/(?P<post_id>\d+)/edit/$', views.post_edit, name='post_edit'),
    url(r'^posts/(?P<post_id>\d+)/del/$', views.post_del, name='post_del'),
]
